﻿
CREATE FUNCTION dbo._Alter
( @ObjectText varchar(8000)
)RETURNS varchar(8000)
AS
BEGIN

DECLARE @I int

SET @I = PATINDEX('CREATE',@ObjectText)

RETURN 'ALTER'+SUBSTRING(@ObjectText,@i+6,8000)

END

